package com.station.server;

import javax.persistence.EntityManager;
import javax.persistence.Persistence;

/**
 * User: JinJavaMojo
 * Date: 25.09.13
 */

public class CustomEntityManager {
    private static EntityManager entityManager;

    public static EntityManager getManager() {
        if (entityManager == null) {
            entityManager = Persistence.createEntityManagerFactory("openJPAUnit").createEntityManager();
        }
        return entityManager;
    }

}
